﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="BannerList.aspx.cs" Inherits="Admin_BannerList" %>

<%--<asp:Content ID="Content1" ContentPlaceHolderID="titlePlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="menuPlaceHolder" runat="Server">
</asp:Content>--%>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <!--  start page-heading -->
    <div id="page-heading">
        <div style="width: 967px;">
            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="content-table">
                <tr>
                    <th class="topleft">
                    </th>
                    <td class="tbl-border-top">
                        &nbsp;</td>
                    <th class="topright">
                    </th>
                </tr>
                <tr>
                    <td class="tbl-border-left">
                    </td>
                    <td>
                        <div class="content-table-inner">
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Title:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:TextBox ID="txtProductNameSearch" runat="server" Width="200"></asp:TextBox></div>
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Create Date:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:TextBox ID="txtCreateDateSearch" runat="server" CssClass="textfield" Width="150px"></asp:TextBox>
                                <input id="Button1" type="button" onclick="displayDatePicker(document.getElementById('<%=txtCreateDateSearch.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');"
                                    value="..." style="width: 25px;" />
                            </div>
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Start Date:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:TextBox ID="txtStartDateSearch" runat="server" CssClass="textfield" Width="150px"></asp:TextBox>
                                <input id="Button2" type="button" onclick="displayDatePicker(document.getElementById('<%=txtStartDateSearch.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');"
                                    value="..." style="width: 25px;" />
                            </div>
                        </div>
                        <div class="content-table-inner">
                            <div class="NameLarge" style="width: 80px; float: left;">
                                End Date:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:TextBox ID="txtExDateSearch" runat="server" CssClass="textfield" Width="150px"></asp:TextBox>
                                <input id="Button3" type="button" onclick="displayDatePicker(document.getElementById('<%=txtExDateSearch.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');"
                                    value="..." style="width: 25px;" />
                            </div>
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Member:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:DropDownList ID="ddlMember" runat="server" Width="200">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="content-table-inner">
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Page:
                            </div>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <contenttemplate>
                            <div style="width: 210px; float: left;">
                                <asp:DropDownList ID="ddlCategory" runat="server" Width="200" AutoPostBack="true"
                                    OnSelectedIndexChanged="ddCategory_OnSelectedIndexChanged">
                                </asp:DropDownList>
                            </div>
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Position on page:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:DropDownList ID="ddlSubCat" runat="server" Width="200" AutoPostBack="true" OnSelectedIndexChanged="ddlSubCat_OnSelectedIndexChanged">
                                </asp:DropDownList>&nbsp;&nbsp;
                            </div>
                            <div class="NameLarge" style="width: 80px; float: left;">
                                Position Name:
                            </div>
                            <div style="width: 210px; float: left;">
                                <asp:DropDownList ID="ddlPosition" runat="server" Width="200">
                                </asp:DropDownList>&nbsp;&nbsp;
                            </div>
                             </contenttemplate>
                            </asp:UpdatePanel>
                        </div>
                        <div class="content-table-inner">
                            <div class="actions-box">
                                <asp:LinkButton ID="btnSearch" runat="server" OnClick="btnSearch_Click">
                                                    <img src="images/Search.png" onmouseover="this.src='images/SearchMouseOver.png';" onmouseout="this.src='images/Search.png';" alt="Search" /></asp:LinkButton>
                            </div>
                            <div class="contenttext">
                                <asp:LinkButton ID="btnSearchAll" runat="server" OnClick="btnSearchAll_Click">
                                                        <img src="images/SearchAll.png" onmouseover="this.src='images/SearchAllMouseOver.png';" onmouseout="this.src='images/SearchAll.png';" alt="Search" /></asp:LinkButton>
                            </div>
                        </div>
                    </td>
                    <td class="tbl-border-right">
                    </td>
                </tr>
                <tr>
                    <th class="sized bottomleft">
                    </th>
                    <td class="tbl-border-bottom">
                        &nbsp;</td>
                    <th class="sized bottomright">
                    </th>
                </tr>
            </table>
        </div>
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <div style="color: Red; font-weight: bold; text-align: center;">
                        <asp:Literal ID="lb_error" runat="server"></asp:Literal>
                    </div>
                    <div style="float: right; padding: 0 20px 10px 10px;">
                        <%--<asp:LinkButton ID="lbtDelete" OnClick="lbtDelete_Onclick" runat="server" OnClientClick="return confirmdelete();">Delete Item select</asp:LinkButton>--%>
                        <img alt="" src="images/ar1.gif" /><a href="Banner.aspx" runat="server" id="AddNewRow">
                            Add New </a>
                        <img alt="" src="images/ar1.gif" />
                        <asp:LinkButton ID="lbtDelete" runat="server" OnClientClick="return confirmdelete();"
                            OnClick="lbtDelete_Click"> Delete Item select </asp:LinkButton>
                    </div>
                    <!--  start table-content  -->
                    <div id="table-content" style="overflow: auto; width: 910px;">
                        <!--  start product-table ..................................................................................... -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <asp:Repeater runat="server" ID="rptList" OnItemDataBound="rptList_OnItemDataBound"
                                OnItemCommand="rptList_OnItemCommand">
                                <HeaderTemplate>
                                    <tr style="font-weight: bold;">
                                        <th align="center" class="table-header-check">
                                            <a style="color: White;">No</a>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="lbtNote" runat="server" CommandArgument="ASC" CommandName="sortName">Title</asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <a>Page</a>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <a>Position on page</a>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <a>Position</a>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <a>Size</a>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="LinkButton5" runat="server" CommandArgument="ASC" CommandName="sortMember">Member</asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="ASC" CommandName="sortCreateDate">Create Date</asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="ASC" CommandName="sortStartDate">Start Date</asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="LinkButton7" runat="server" CommandArgument="ASC" CommandName="sortExDate">End Date</asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="ASC" CommandName="sortView">Count View </asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="ASC" CommandName="sortOrder">SortOrder</asp:LinkButton>
                                        </th>
                                        <th align="center" class="table-header-repeat line-left">
                                            <a>Enable </a>
                                        </th>
                                        <th align="center" width="50" id="tdDelete" runat="server" class="table-header-options1 line-left">
                                            <input id="checkall" onclick='CheckAll(this);' type="checkbox" name="checkall"></th>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr id="tr" runat="server">
                                        <td align="center">
                                            <asp:Literal ID="ltrNo" runat="server"></asp:Literal><asp:HiddenField ID="hidID"
                                                runat="server" />
                                        </td>
                                        <td align="center">
                                            <a href="Banner.aspx?Id=<%#Eval("BannerId")%>">
                                                <asp:Literal runat="server" ID="ltrName"></asp:Literal></a>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrPage"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrPositionPage"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <a href="PositionBanner.aspx?Id=<%#Eval("BannerLocationId")%>">
                                                <asp:Literal runat="server" ID="ltrPositonBanner"></asp:Literal></a>
                                        </td>
                                        <td align="center">
                                            <a id="hrfSize" runat="server">
                                                <asp:Literal runat="server" ID="ltrSize"></asp:Literal></a>
                                        </td>
                                        <td align="center">
                                            <a href="Members.aspx?Id=<%#Eval("MemberId")%>">
                                                <asp:Literal runat="server" ID="ltrMember"></asp:Literal></a>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrCreateDate"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrStaDate"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrExDate"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:Literal runat="server" ID="ltrClick"></asp:Literal>
                                        </td>
                                        <td align="center">
                                            <asp:TextBox ID="txtOrder" runat="server" BackColor="white" Width="40px"></asp:TextBox>
                                        </td>
                                        <td align="center">
                                            <asp:DropDownList ID="ddl_Status" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="center">
                                            <input runat="server" onclick="select_change(this.form)" id="chkDelete" type="checkbox"
                                                value='<%# DataBinder.Eval(Container.DataItem, "BannerId") %>' name="delete" />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--  end product-table................................... -->
                    </div>
                    <!--  end content-table  -->
                    <!--  start actions-box ............................................... -->
                    <div class="actions-box">
                        <asp:LinkButton ID="btnSave" runat="server" OnClick="btnSave_OnClick">
                                        <img src="images/Update.png" onmouseover="this.src='images/UpdateMouseOver.png';" onmouseout="this.src='images/Update.png';" alt="Search" /></asp:LinkButton>
                    </div>
                    <!-- end actions-box........... -->
                    <!--  start paging..................................................... -->
                    <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                        <tr>
                            <td>
                                <div style="width: 600px; float: left;">
                                    <div class="pages a_right" style="padding-bottom: 3px;" align="center">
                                        <strong>
                                            <PagerV2:PagerV2_8 ID="hyperlinkPager" runat="server" CompactModePageCount="5" GenerateFirstLastSection="true"
                                                OnCommand="pager_Command" GeneratePagerInfoSection="false" GenerateSmartShortCuts="false"
                                                GenerateHiddenHyperlinks="false" NormalModePageCount="5" />
                                        </strong>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <!--  end paging................ -->
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
    function confirmdelete()
    {
        return confirm("You certainly will delete the selected?");
    }
  
    </script>

    <script type="text/javascript" language="javascript">
     function CheckAll(obj)
    {
        // find any item not check
        
        var countUncheck = 0;
        var checkAll = true;
        var checkList = document.getElementsByTagName("input");
            
        if(!obj.checked)
            checkAll = false;
        for(var i = 0 ; i < checkList.length ; i++)
        { 
        if(checkList[i].type == 'checkbox' && checkList[i].id.indexOf("chkDelete") >= 0 )
        {
        checkList[i].checked = checkAll;
        }
        } 
    }
   
    </script>

</asp:Content>
